import store from "@/store";
import dayjs from "dayjs";
export const formItemStyle = {
  paddingLeft: "20px",
};

export const cellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};

// 表头单元格样式
export const headerCellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};
// 表格内表单子样式
export const tableFormStyle = {
  marginBottom: 0,
};
export const tableBase = [
  {
    label: "ID",
    prop: "id",
    width: 40,
  },
  {
    label: "承运商名称",
    prop: "carrierName",
    operate: {
      type: "input",
      field: "carrierName",
    },
  },
  {
    label: "客户代码",
    prop: "customCode",
    operate: {
      type: "input",
      field: "customCode",
    },
  },
  {
    label: "未使用数量",
    prop: "notUsedNum",
    width: 150,
    operate: {
      type: "inputNumber",
      field: "notUsedNum",
    },
  },
  {
    label: "清关公司",
    prop: "customsName",
    width: 150,
    operate: {
      type: "select",
      field: "customsCompanyId",
      optionsKey: "customsName",
      optionsValue: "id",
      options: store.state.custom_dict.customCompany,
    },
  },
  {
    label: "目的地",
    prop: "destinationName",
    width: 150,
    operate: {
      type: "select",
      field: "destinationId",
      optionsKey: "destinationName",
      optionsValue: "id",
      options: store.state.custom_dict.destination,
    },
  },
  {
    label: "快件查询地址",
    prop: "deliveryQueryAddr",
    width: 100,
    operate: {
      type: "input",
      field: "deliveryQueryAddr",
    },
  },
  {
    label: "寄件人",
    prop: "senderId",
    operate: {
      type: "input",
      field: "senderId",
    },
  },
  {
    label: "是否有效",
    prop: "isEffective",
    slotName: "isEffective",
  },
  {
    label: "寄件手机号",
    prop: "senderPhone",
    operate: {
      type: "input",
      field: "senderPhone",
    },
    rules: [{ reg: /^(?:(?:\+|00)86)?1[3-9]\d{9}$/ }],
  },
  {
    label: "寄件地址",
    prop: "senderAddr",
    operate: {
      type: "input",
      field: "senderAddr",
    },
  },
  {
    label: "是否打子单",
    prop: "isPrint",
    slotName: "isPrint",
  },
  {
    label: "寄件人城市",
    prop: "senderCityId",
    operate: {
      type: "input",
      field: "senderCityId",
    },
  },
  {
    label: "寄件人省份",
    prop: "senderProvinceId",
    operate: {
      type: "input",
      field: "senderProvinceId",
    },
  },
  {
    label: "邮编",
    prop: "zipCode",
    operate: {
      type: "input",
      field: "zipCode",
    },
  },
];
